<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
  </style>
</head>
<body>
  <canvas class="cvs"></canvas>
</body>
<script>

  const cvs = document.querySelector(".cvs");
  cvs.width = 400;
  cvs.height = 400;

  const c2d = cvs.getContext("2d");
  
  c2d.lineWidth = 10;
  c2d.lineJoin = "bevel";

  c2d.strokeRect(100, 100, 150, 100);
  
  c2d.moveTo(100, 100);
  c2d.lineTo(175, 150);
  c2d.lineTo(250, 100);

  c2d.stroke();
  
</script>
</html>